package com.zy.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping(value = "/user")
public class UserController {
    @PostMapping(value = "/login")
    public String getUser(@RequestBody Map<String, String> requestBody){
        System.out.println("用户名：" + requestBody.get("name")  + "密码：" + requestBody.get("password"));
        String response = "登录成功"+requestBody.get("name");
        return response;
    }
}
